a = 1
MAX = 1
for i in xrange(500000):
    b = a + sum((int(x) for x in list(str(a))))
    c = b - a,
    #print b-a ,
    if c > MAX:
#        print '|',
        MAX = c
        print MAX,
    a = b






